Prefer more recent version of libtinfo when selecting GHC build #3343
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When both libtinfo 5 and 6 are installed on the same system, Stack currently defaults to 5. This breaks if nopie is also required, because the
no-pie
flags in stack-setup-2.yaml differ in case betweenlinux64-nopie
andlinux64-tinfo6-nopie
. In the long run it would probably make sense to simply infer the correct flags within Stack instead of hardcoding them in YAML, but that's a much more complex change.Instead, this patch changes the order these flags are tested in, so that we default to the newer version if both are present.
I've tested it by running
stack setup
on the following distros (via Docker images):standard
standard